package cn.rulian.base.auth.bo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.fasterxml.jackson.annotation.JsonFormat;

import cn.rulian.base.common.bo.BaseBo;
import lombok.Getter;
import lombok.Setter;


/** 
 * Description: 机构
 */
@Getter
@Setter

@Entity
@Table(name = "base_auth_organ")
public class Organ extends BaseBo{
	
	public static final String MARK_YXZ="营销组"; //特殊机构标记（模拟，暂不用）
	
	@ManyToOne
	@JoinColumn(name = "father_id")
	private Organ father; //父机构
	
	@Column(length = 10)
	private String innerCode; //内部编码
	
	@Column(length = 50)
	private String code; //全编号
	
	@Column(length = 50)
	private String name; //名称
	
	@Column(length = 50)
	private String mark; //特殊标记
	
	private Boolean locked; //是否锁定。锁定后不允许编辑删除，防止误操作。
	
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") 
	private Date addTime; //增加时间
	
	@Transient
	private Long _parentId;

	
}